package com.czmh.etc.onlinepubsys.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.czmh.etc.common.core.annotation.ApiVersion;
import com.czmh.etc.onlinepubsys.json.JsonResult;
import com.czmh.etc.onlinepubsys.model.EtcApplyOrder;
import com.czmh.etc.onlinepubsys.services.IEtcApplyOrderService;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

/**
 * @ClassName：YuePubController
 * @Description：粤通卡发行控制器
 * @Author： sevenchen.
 * @Date：2019/10/14 10:33.
 * @Version：1.0.0
 */
@RestController
@RequestMapping("/{version}/api/yue/order/")
@Api(tags = "ETC申办订单接口")
public class EtcApplyOrderController {
    @Autowired
    private IEtcApplyOrderService iEtcApplyOrderService;

    @ApiVersion(1)
    @PostMapping(value = "callback")
    @ApiOperation(value="粤通宝回调申请信息", notes = "粤通宝回调申请信息")
    public JsonResult callback(@RequestBody EtcApplyOrder order){
        return iEtcApplyOrderService.saveOrderInfo(order);
    }
}
